package com.aliyun.messagemgt.application.service.mq;

import java.util.Objects;

/**
 * Created with IDEA
 *
 * @author:zhangxingxing 0027012120
 * @date:2019/4/3
 * @time:16:13
 */
public class Receiver {
    /**
     * 接收者类型
     */
    private Integer receiverType;
    /**
     * 接收者ID
     */
    private String receiverId;
    /**
     * 接收者姓名
     */
    private String receiverName;

    public Integer getReceiverType() {
        return receiverType;
    }

    public Receiver setReceiverType(Integer receiverType) {
        this.receiverType = receiverType;
        return this;
    }

    public String getReceiverId() {
        return receiverId;
    }

    public Receiver setReceiverId(String receiverId) {
        this.receiverId = receiverId;
        return this;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public Receiver setReceiverName(String receiverName) {
        this.receiverName = receiverName;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Receiver{");
        sb.append("receiverType=").append(receiverType);
        sb.append(", receiverId=").append(receiverId);
        sb.append(", receiverName=").append(receiverName);
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Receiver receiver = (Receiver) o;
        return Objects.equals(getReceiverType(), receiver.getReceiverType()) &&
                Objects.equals(getReceiverId(), receiver.getReceiverId()) &&
                Objects.equals(getReceiverName(), receiver.getReceiverName());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getReceiverType(), getReceiverId(), getReceiverName());
    }
}
